import axios from '@/api/interceptor';

export const selectCategory = async () => {
  const result = await axios({
    url: '/categoriesFront/getCategoryList',
    method: 'GET',
  });
  return result.data;
};

export const getCategoryArticle = async () => {
  const result = await axios({
    url: '/categoriesFront/getCategoryArticle',
    method: 'GET',
  });
  return result.data;
};

export const getCategoryListByIds = async (ids:string[]) => {
  const result = await axios({
    url: '/categoriesFront/getCategoryListByIds',
    method: 'GET',
    params: {
      ids:ids.join(',')
    }
  });
  return result.data;
};

